﻿using System;
using System.IO;
using System.Net;
using System.Collections.Generic;
using System.Threading.Tasks;
using NFinal;

//此代码由NFinalCompiler生成。
//http://bbs.nfinal.com
namespace NFinalCoreServer.Views.Index
{
    /// <summary>
    /// 模板类
    /// </summary>
    [View("/NFinalCoreServer/Views/Index/About.cshtml")]
    public class About_cshtml : NFinal.View.RazorView<NFinalCoreServer.Controllers.IndexController_Model.About>
    {
        /// <summary>
        /// 模板类初始化函数
        /// </summary>
        /// <param name="writer">写对象</param>
        /// <param name="Model">任意对象</param>
        public About_cshtml(NFinal.IO.Writer writer, object Model) : base(writer, Model)
        {

        }
        /// <summary>
        /// 模板类初始化函数
        /// </summary>
        /// <param name="writer">写对象</param>
        /// <param name="Model">实体数据</param>
        public About_cshtml(NFinal.IO.Writer writer, NFinalCoreServer.Controllers.IndexController_Model.About Model) : base(writer, Model)
        {

        }
        /// <summary>
        /// 输出模板内容
        /// </summary>
        public override void Execute()
        {
            this.ExecuteAsync().Wait();
        }
        /// <summary>
        /// 输出模板内容(异步)
        /// </summary>
        public override async Task ExecuteAsync()
        {
            writer.Write("<!DOCTYPE html>\r\n<html>\r\n<head>\r\n    <meta charset=\"utf-8\" />\r\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\r\n    <title>");
            await writer.WriteAsync(Model.Title);
            writer.Write("</title>\r\n    ");
            await writer.WriteAsync(RenderPage("/NFinalCoreServer/Views/Shared/HeadContent.cshtml"));
            writer.Write("\r\n</head>\r\n<body>\r\n    ");
            await writer.WriteAsync(RenderPage("/NFinalCoreServer/Views/Shared/NavContent.cshtml"));
            writer.Write("\r\n    <div class=\"container body-content\">\r\n        <h2>");
            await writer.WriteAsync(Model.Title);
            writer.Write("</h2>\r\n        <h3>");
            await writer.WriteAsync(Model.Message);
            writer.Write("</h3>\r\n\r\n        <p>Use this area to provide additional information.</p>\r\n\r\n        <hr />\r\n        <footer>\r\n            <p>&copy; 2017 - NFinal</p>\r\n        </footer>\r\n    </div>\r\n</body>\r\n</html>\r\n");
        }
    }
}
